import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/sysRole/list',
    method: 'post',
    params: query
  })
}

export function see(id) {
  return request({
    url: '/sysRole/see/' + id,
    method: 'post'
  })
}

export function modify(params) {
  return request({
    url: '/sysRole/modify',
    method: 'post',
    params
  })
}

export function findTransferAll() {
  return request({
    url: '/sysRole/findTransferAll',
    method: 'post'
  })
}

export function findPermissionIdByRoleId(id) {
  return request({
    url: '/sysRole/findPermissionIdByRoleId',
    method: 'post',
    params: {
      roleId: id
    }
  })
}
export function addPermission(params) {
  return request({
    url: '/sysRole/addPermission',
    method: 'post',
    params
  })
}
export function add(params) {
  return request({
    url: '/sysRole/add',
    method: 'post',
    params
  })
}
export function remove(ids) {
  return request({
    url: '/sysRole/remove',
    method: 'post',
    params:{
      ids:ids
    }
  })
}

